package org.rency.ues.dal.dao.impl;

import org.rency.common.sequence.service.SequenceRepository;
import org.rency.ues.common.UesDict;
import org.rency.ues.dal.dao.UesSequenceDao;

/**
 * ${todo}
 *
 * @author: Created by user_rcy@163.com on 2016/07/31.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class UesSequenceDaoImpl implements UesSequenceDao {

    private SequenceRepository sequenceRepository;

    @Override
    public Long getSerialSequence() {
        return sequenceRepository.next(UesDict.SEQ_NAME_CERT_SERIAL);
    }

    @Override
    public Long getTicketSequence(String sequenceName) {
        return sequenceRepository.next(sequenceName);
    }

    public void setSequenceRepository(SequenceRepository sequenceRepository) {
        this.sequenceRepository = sequenceRepository;
    }
}
